﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace WindowsGame1
{
    class MainMenu
    {
        private Vector2 posBot;
        private Texture2D Bot;
        char Func;
        public MainMenu(int x, int y, Texture2D xpto, char f)
        {
            posBot = new Vector2(x, y);
            Func = f;
            LoadContent(xpto);
        }
        public void LoadContent(Texture2D xpto)
        {
            Bot = xpto;
        }
        public Vector2 getPos()
        {
            return posBot;
        }
        public Texture2D getBot()
        {
            return Bot;
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(getBot(), getPos(), Color.White);
        }

        public char Colide(int x, int y, char aonde)
        {
            Rectangle r1 = new Rectangle(x, y, 5, 5);
            Rectangle r2 = new Rectangle((int)posBot.X, (int)posBot.Y, (int)Bot.Width, (int)Bot.Height);

            if(r1.Intersects(r2))
            {
                return Func;
            }
            return aonde;
        }

    }
}
